// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import { Routers } from './router'
// import i18n from '@/locale'

import config from '@/config'
import installPlugin from '@/plugin'

import api from '@/api'
const BaseTable =()=> import('_c/base-table')
const  Delete =()=>import('_c/ModalConfirm')
import opendata from './components/open-data/openData.vue'
import UnifyTitle from './components/unify-title/unify-title.vue'

import ButtonMenu from "_c/main/menu/buttonMenu";

import { parseTime,handleTree, simplifyNum, commonFn, buttonMenu, columnMenu } from "@/libs/util";



import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
//

import {Layout,Icon, Button,Menu } from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css'
Vue.component(Button.name, Button)
Vue.component(Layout.name, Layout);
Vue.component(Layout.Header.name, Layout.Header);
Vue.component(Layout.Content.name, Layout.Content);
Vue.component(Layout.Footer.name, Layout.Footer);
Vue.component(Layout.Sider.name, Layout.Sider);
Vue.component(Icon.name, Icon)
Vue.component(Menu.name, Menu)
Vue.component(Menu.SubMenu.name, Menu.SubMenu)
Vue.component(Menu.Item.name, Menu.Item)
import Viewer from 'v-viewer'
import 'view-design/dist/styles/iview.css'
import ViewUI, { Message } from 'view-design'
import './index.less'
import '@/assets/icons/iconfont.css'
import './libs/styles/flex.less'
import './libs/styles/mytheme.less'
import './libs/styles/common.less'
import './libs/styles/custom.less'
import icontFont from './assets/iconfont/iconfont'
import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import '@/router/index.js'
import '@/components/directive'
const myicon =  Icon.createFromIconfontCN({
   scriptUrl: icontFont
 })
Vue.component('my-icon', myicon)

Vue.use(Viewer)
Viewer.setDefaults({
  Options: {
    inline: true,
    button: true,
    navbar: true,
    title: false,
    toolbar: true,
    tooltip: false,
    movable: false,
    zoomable: false,
    rotatable: false,
    scalable: false,
    transition: false,
    fullscreen: true,
    keyboard: true,
    url: 'data-source',
  },
})
Vue.use(ViewUI,{
  size:'default'
})
/**
 * @description 注册admin内置插件
 */
installPlugin(Vue)
/**
 * @description 生产环境关掉提示
 */
Vue.config.productionTip = false
/**
 * @description 全局注册应用配置
 */
Vue.prototype.$config = config


// 全局组件注册
Vue.component('BaseTable', BaseTable)
Vue.component('Delete', Delete)
Vue.component('opendata', opendata)
Vue.component('UnifyTitle', UnifyTitle)
Vue.component('ButtonMenu', ButtonMenu)
Vue.use(VueQuillEditor)


Vue.prototype.APIS = api
Vue.prototype.$store = store
Vue.prototype.$Message = Message
Vue.prototype.parseTime = parseTime
Vue.prototype.handleTree = handleTree
Vue.prototype.simplifyNum = simplifyNum
Vue.prototype.commonFn = commonFn
Vue.prototype.buttonMenu = buttonMenu
Vue.prototype.columnMenu = columnMenu
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  Routers,
  // i18n,
  store,
  render: h => h(App)
}).$mount('#app')
